-
Notifications
You must be signed in to change notification settings - Fork 4
feat(#16): raise error when fuzzy detected #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Hello @angryfoxx, Thanks for your PR! Fuzzy strings are not really "errors" in the file, as they are not used at runtime (it's like if strings were not translated). But I agree it's nice to know we have fuzzy strings in the translations. By the way you have some other easy ways to find them, for example with Or with pocount: It could be added in msgcheck as well, but this should be an optional check disabled by default (with a new command line option), as msgcheck is really focused on "errors" in translations, ie typos, punctuation, etc., not on translation progress (number of fuzzy or untranslated strings). |
|
ok i will work on this, i think this tool would be great after this implemantation thx for your review @flashcode |
|
hi @flashcode could u rw again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new error_on_fuzzy option that raises an error when fuzzy strings are detected in PO files, addressing issue #16. Unlike the existing fuzzy check which processes fuzzy strings for validation, this new option treats the presence of fuzzy strings as an error condition.
Changes:
- Added
--error-on-fuzzy/-FCLI flag to report fuzzy strings as errors - Implemented fuzzy detection logic that reports each fuzzy string found
- Added comprehensive test coverage for both positive and negative cases
- Updated .gitignore with standard Python development artifacts
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/test_msgcheck.py | Added two test functions validating the error_on_fuzzy option with and without fuzzy strings present |
| src/msgcheck/po.py | Added error_on_fuzzy check option and implementation to detect and report fuzzy strings |
| src/msgcheck/msgcheck.py | Added CLI argument for error-on-fuzzy flag and integrated it into option processing |
| .gitignore | Added common Python development directories and cache files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.